package cn.com.pc.content.interceptor;

import cn.com.pc.content.config.SiteRbacContext;
import cn.com.pc.content.service.SiteOperatorService;
import cn.com.pc.rbac.client.RbacContext;
import cn.com.pc.rbac.client.RbacInterceptor;
import cn.com.pc.rbac.client.RbacService;

public class SiteRbacInterceptor extends RbacInterceptor {

    private final SiteOperatorService siteOperatorService;

    public SiteRbacInterceptor(RbacService rbacService, SiteOperatorService siteOperatorService) {
        super(rbacService);
        this.siteOperatorService = siteOperatorService;
    }


    @Override
    protected RbacContext loadRbacContext(Long accountId) {
        return new SiteRbacContext(super.loadRbacContext(accountId), siteOperatorService);
    }

}
